<%-- 
    Document   : view-average-moulding-graph
    Created on : Jun 23, 2011, 11:21:13 AM
    Author     : Fikri
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
         <jsp:include page="includes/script.html"/>
         <link href="css/init.css" rel="stylesheet" type="text/css">
        <title>Average Moulding</title>
    </head>
    <body>
        <center>
         <form method="get">


           From : <input type="text" value="${start}" name="start" readonly> <img src="images/calendar.gif" onclick="displayDatePicker('start', false, 'ymd', '-');" />&nbsp;
             To : <input type="text" value="${end}" name="end" readonly> <img src="images/calendar.gif" onclick="displayDatePicker('end', false, 'ymd', '-');" />&nbsp;
               <input  type="submit" name="submit" value="View" >

        </form>
            </center>
        <br>
        <center><a href="view-average-moulding-graph.png"><img src="view-average-moulding-graph.png" width="800" border="0"></a></center>
        <br>
        <c:if test='${not empty start}'>
        <br>
        <center>
        <table width="1000">
            <tr bgcolor="#FFFFFF">
                <td width="7%">Date</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">avg <fmt:formatDate pattern="MMM" value="${data.date}" /></td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center"><fmt:formatDate pattern="dd" value="${data2.date}" /></td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">A</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.a}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.a}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">B</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.b}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.b}</td>
                </c:forEach>

            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">C</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.c}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.c}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">D</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.d}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.d}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">E</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.e}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.e}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">F</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.f}</td>
                </c:forEach>
                
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.f}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">G</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.g}</td>
                </c:forEach>
               
                <c:forEach items="${data2}" var="data2">
                    <td width="3%" align="center">${data2.g}</td>
                </c:forEach>
            </tr>

        </table>

            <br>
            <br>
            <table>
                <tr>
                    <td>
                        Keterangan :
                <br>
                A&nbsp;:&nbsp;Moulding PMS<br>
                B&nbsp;:&nbsp;Moulding SM60<br>
                C&nbsp;:&nbsp;Moulding Disa<br>
                D&nbsp;:&nbsp;Moulding 2ML<br>
                E&nbsp;:&nbsp;Moulding SSM<br>
                F&nbsp;:&nbsp;Moulding Total<br>
                G&nbsp;:&nbsp;Target<br>
                    </td>
                </tr>
            </table>

                

        </center>
        
        </c:if>
    </body>
</html>
